package com.zhanggm.s3.house.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.data.elasticsearch.annotations.HighlightField;

/**
 * <p>
 *
 * </p>
 *
 * @author zhanggm
 * @since 2023-07-28
 */
@Data
@Document(indexName = "house-anjuke", shards = 3, replicas = 2)
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class HouseAnjuke implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @Id
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 标题
     */
    @HighlightField
    @Field(type = FieldType.Text,index = true,store = true,analyzer = "ik_max_word")
    private String title;

    /**
     * 房屋图片
     */
    private String img;

    /**
     * 房屋详情
     */
    @Field(type = FieldType.Text,index = true,store = true,analyzer = "ik_max_word")
    private String detailItem;

    /**
     * 房屋标签
     */
    @Field(type = FieldType.Text,index = true,store = true,analyzer = "ik_max_word")
    private String detailItemTag;

    /**
     * 价格
     */
    private String price;

    /**
     * 房屋底部标签
     */
    @Field(type = FieldType.Text,index = true,store = true,analyzer = "ik_max_word")
    private String detailItemBotTag;

    /**
     * 数据来源
     */
    private String fromUrl;


}
